const Koa =   require('koa');
const Router = require('koa-router');
const {createAvatar,createPicture}=require('../controllers/upload');
const {verify_auth}=require('../middleware/auth');
const {avatarHandler,pictureHandler,pictureResize}=require('../middleware/file');
const uploadRoute = new Router({
    prefix: '/upload'
});
uploadRoute.post('/avatar',verify_auth,avatarHandler,createAvatar );
uploadRoute.post('/picture', verify_auth,pictureHandler,pictureResize,createPicture);

module.exports = uploadRoute;